﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GridView_Ex.aspx.cs" Inherits="Web.BusinessInformation.Example.GridView_Ex"  %>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Untitled Page</title>
    <link href="../../App_Themes/Default/Default.css" rel="stylesheet" type="text/css" />
    <script src="../../JS/jquery-1.11.1.min.js" type="text/javascript"></script>
    <style type="text/css">
        .test2 {
           color: red
        }
    </style>
    <script type="text/javascript">
    
   
        $(document).ready(function () {
            setInterval(function () {
                $(".test2").fadeOut(200).fadeIn(200);
            }, 400);
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel ID="UpdatePanel" runat="server">
                <ContentTemplate>
                    <br />
                    <br />
                    模式选择：<asp:DropDownList ID="ddlType" runat="server" OnSelectedIndexChanged="ddlType_SelectedIndexChanged"
                        AutoPostBack="true">
                        <asp:ListItem Text="分页" Value="1" Selected="True"> </asp:ListItem>
                        <asp:ListItem Text="全部" Value="2"> </asp:ListItem>
                    </asp:DropDownList>
                    <asp:TextBox runat="server" Text="10" ID="txtPage"> </asp:TextBox>
                    <asp:CheckBox runat="server" ID="chkQuery" Text="精确定位" OnCheckedChanged="chkQuery_CheckedChanged"
                        AutoPostBack="true" />
                    <br />
                    <br />
                    <dx:ASPxGridView ID="gvTest" runat="server" Width="98%" AutoGenerateColumns="False"
                        Settings-ShowVerticalScrollBar="true" KeyFieldName="用户号" SkinID="test2222" 
                        ClientIDMode="AutoID" ondatabinding="gvTest_DataBinding" 
                        ondatabound="gvTest_DataBound" onhtmlrowcreated="gvTest_HtmlRowCreated"> 
                        <Columns>
                              <dx:GridViewDataTextColumn FieldName="" Width="20px" FixedStyle=" Left" 
                                >
                                          <DataItemTemplate>
                          <asp:Label runat="server"  ID="textLable"  Text="!" CssClass="test2" > 
                            </asp:Label>   
                            </DataItemTemplate>
                              </dx:GridViewDataTextColumn>
                                <dx:GridViewDataColumn FieldName="用户号" Width="100px" FixedStyle="Left" 
                                VisibleIndex="1"  /> 
                            <dx:GridViewDataColumn FieldName="用户名" Width="500px" />
                            <dx:GridViewDataColumn FieldName="初开金额" />
                            <dx:GridViewDataColumn FieldName="实收金额" />
                            <dx:GridViewDataColumn FieldName="核销金额" />
                            <dx:GridViewDataColumn FieldName="欠费" />
                            <dx:GridViewDataColumn FieldName="回收率（%）" />
                            <dx:GridViewDataColumn FieldName="实收/应收" />
                        </Columns>
             
                        <SettingsBehavior ColumnResizeMode="NextColumn" />
                        <SettingsBehavior AllowFocusedRow="True" />
                        <Settings ></Settings>
<%--                        <Settings GridLines=" Both" ShowFilterRow="false"  />--%>
                        <Settings ShowHorizontalScrollBar="True" />
                        <Settings ShowFooter="True" /> 
                        <SettingsBehavior ColumnResizeMode="NextColumn" />
                        <SettingsBehavior AllowFocusedRow="True" />
                        <Settings GridLines="Vertical" ShowFilterRow="false" />
                        <Settings ShowHorizontalScrollBar="True" />
                        <Settings ShowFooter="True" />
                        <SettingsBehavior ColumnResizeMode="NextColumn" />
                        <SettingsBehavior AllowFocusedRow="True" />
                        <Settings GridLines="Vertical" ShowFilterRow="false" />
                        <Settings ShowHorizontalScrollBar="True" />
                        <Settings ShowFooter="True" />
                        <SettingsBehavior ColumnResizeMode="NextColumn" />
                        <SettingsBehavior AllowFocusedRow="True" /><Settings GridLines="Vertical" ShowFilterRow="false" /><Settings ShowHorizontalScrollBar="True" /><Settings ShowFooter="True" /><SettingsBehavior ColumnResizeMode="NextColumn" /><SettingsBehavior AllowFocusedRow="True" /><Settings GridLines="Vertical" ShowFilterRow="false" /><Settings ShowHorizontalScrollBar="True" /><Settings ShowFooter="True" /><SettingsBehavior ColumnResizeMode="NextColumn" /><SettingsBehavior AllowFocusedRow="True" /><Settings GridLines="Vertical" ShowFilterRow="false" /><Settings ShowHorizontalScrollBar="True" /><Settings ShowFooter="True" /><SettingsBehavior ColumnResizeMode="NextColumn" /><SettingsBehavior AllowFocusedRow="True" /><Settings GridLines="Vertical" ShowFilterRow="false" /><Settings ShowHorizontalScrollBar="True" /><Settings ShowFooter="True" /><SettingsBehavior ColumnResizeMode="NextColumn" /><SettingsBehavior AllowFocusedRow="True" /><Settings GridLines="Vertical" ShowFilterRow="false" /><Settings ShowHorizontalScrollBar="True" /><Settings ShowFooter="True" /><SettingsBehavior ColumnResizeMode="NextColumn" /><SettingsBehavior AllowFocusedRow="True" /><Settings GridLines="Vertical" ShowFilterRow="false" /><Settings ShowHorizontalScrollBar="True" /><Settings ShowFooter="True" /><SettingsBehavior ColumnResizeMode="NextColumn" /><SettingsBehavior AllowFocusedRow="True" /><Settings GridLines="Vertical" ShowFilterRow="false" /><Settings ShowHorizontalScrollBar="True" /><Settings ShowFooter="True" /><SettingsBehavior ColumnResizeMode="NextColumn" /><SettingsBehavior AllowFocusedRow="True" /><Settings GridLines="Vertical" ShowFilterRow="false" /><Settings ShowHorizontalScrollBar="True" /><Settings ShowFooter="True" /><SettingsBehavior ColumnResizeMode="NextColumn" /><SettingsBehavior AllowFocusedRow="True" /><Settings GridLines="Vertical" ShowFilterRow="false" /><Settings ShowHorizontalScrollBar="True" /><Settings ShowFooter="True" /><SettingsBehavior ColumnResizeMode="NextColumn" /><SettingsBehavior AllowFocusedRow="True" /><Settings GridLines="Vertical" ShowFilterRow="false" /><Settings ShowHorizontalScrollBar="True" /><Settings ShowFooter="True" /><SettingsBehavior ColumnResizeMode="NextColumn" /><SettingsBehavior AllowFocusedRow="True" /><Settings GridLines="Vertical" ShowFilterRow="false" /><Settings ShowHorizontalScrollBar="True" /><Settings ShowFooter="True" /><SettingsBehavior ColumnResizeMode="NextColumn" /><SettingsBehavior AllowFocusedRow="True" /><Settings GridLines="Vertical" ShowFilterRow="false" /><Settings ShowHorizontalScrollBar="True" /><Settings ShowFooter="True" /><SettingsBehavior ColumnResizeMode="NextColumn" /><SettingsBehavior AllowFocusedRow="True" /><Settings GridLines="Vertical" ShowFilterRow="false" /><Settings ShowHorizontalScrollBar="True" /><Settings ShowFooter="True" /><TotalSummary>
                            <dx:ASPxSummaryItem FieldName="用户号" SummaryType="Count" />
                            <dx:ASPxSummaryItem FieldName="初开金额" SummaryType="Sum" DisplayFormat="c" />
                            <dx:ASPxSummaryItem FieldName="欠费" SummaryType="Average" />
                        </TotalSummary>
                    </dx:ASPxGridView>
                </ContentTemplate>
            </asp:UpdatePanel>
            <dx:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="gvTest">
            </dx:ASPxGridViewExporter>
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td style="padding-right: 4px">
                        <dx:ASPxButton ID="btnXlsExport" runat="server" Text="导出XLS" UseSubmitBehavior="False"
                            OnClick="btnXlsExport_Click" />
                    </td>
                </tr>
            </table>
        </div>
         <dx:ASPxComboBox ID="ASPxComboBox1" runat="server" ValueType="System.String"  DropDownStyle="DropDownList" >
                                    <Items>
                                        <dx:ListEditItem Text="1" Value="a" />
                                           <dx:ListEditItem Text="2" Value="b" />
                                           <dx:ListEditItem Text="3" Value="c" />
                                           <dx:ListEditItem Text="4" Value="d" />
                                    </Items>

                                </dx:ASPxComboBox>
    </form>
</body>
</html>
